// src/api/userApi.js
import { apiClient } from './base'

export const getUsers = (params) => apiClient.get('/users/employed', { params })
export const getUserById = (id) => apiClient.get(`/users/${id}`)
export const createUser = (user) => apiClient.post('/users', user)
export const updateUser = (user) => apiClient.put('/users', user)
export const deleteUser = (id) => apiClient.delete(`/users/${id}`)
export const resetPassword = (id, passwordData) => 
  apiClient.put(`/users/${id}/reset-password`, passwordData)

// 添加状态更新接口（关键修复）
export const updateUserStatus = (id, statusData) => 
  apiClient.put(`/users/${id}/status`, statusData)